package com.ctrip.ec.api.mobile.controller;

import com.ctrip.ec.api.mobile.config.AlipayConfig;
import com.ctrip.ec.api.mobile.config.WxPayProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by jiangzy on 2018/10/11.
 */
@RestController
@RequestMapping("config")
@PropertySource("classpath:alipay.properties")
public class ConfigController {
    @Autowired
    private WxPayProperties wxProperties;

    @Autowired

    private AlipayConfig alipayConfig;

    @GetMapping("wechat")
    public WxPayProperties wechat() {
        return wxProperties;
    }

    @GetMapping("alipay")
    public AlipayConfig alipay() {
        return alipayConfig;
    }

}
